﻿<controls:ChildWindow
    x:Class="TheOliver.DigitalSignage.Client.Windows.SelectRoomWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
    Width="400"
    Height="300"
    Title="Select Room"
    xmlns:riaControls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Ria"
    xmlns:my="clr-namespace:AdminApp.Web.Services;assembly=TheOliver.DigitalSignage.Client.Interfaces"
    xmlns:dataInput="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data.Input"
    DataContext="{Binding}">
    <Grid
        x:Name="LayoutRoot"
        Margin="2">
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition
                Height="Auto" />
        </Grid.RowDefinitions>

        <Button
            x:Name="OKButton"
            Content="OK"
            Click="OKButton_Click"
            Width="75"
            Height="23"
            HorizontalAlignment="Right"
            Margin="0,12,79,0"
            IsEnabled="False"
            Grid.Row="1" />

        <Button
            x:Name="CancelButton"
            Content="Cancel"
            Click="CancelButton_Click"
            Width="75"
            Height="23"
            HorizontalAlignment="Right"
            Margin="0,12,0,0"
            Grid.Row="1" />

        <ComboBox
            Height="23"
            HorizontalAlignment="Left"
            Margin="63,70,0,0"
            x:Name="comboBox1"
            VerticalAlignment="Top"
            Width="272"
            ItemsSource="{Binding Data, ElementName=roomDomainDataSource}"
            DisplayMemberPath="Name" />
        <riaControls:DomainDataSource
            AutoLoad="False"
            Height="0"
            LoadedData="roomDomainDataSource_LoadedData"
            x:Name="roomDomainDataSource"
            QueryName="GetRoomByEventQuery"
            Width="0">
            <riaControls:DomainDataSource.DomainContext>
                <my:DigitalSignageDomainContext />
            </riaControls:DomainDataSource.DomainContext>
            <riaControls:DomainDataSource.QueryParameters>
                <riaControls:ControlParameter
                    ControlName="_eventId"
                    ParameterName="eventId"
                    PropertyName="Text" />
            </riaControls:DomainDataSource.QueryParameters>
        </riaControls:DomainDataSource>
        <StackPanel
            Height="30"
            HorizontalAlignment="Left"
            Orientation="Horizontal"
            VerticalAlignment="Top">

            <TextBox
                x:Name="_eventId"
                Width="60"
                Visibility="Collapsed" />
            <Button
                Click="roomDomainDataSourceLoadButton_Click"
                Content="Load"
                Margin="3"
                x:Name="roomDomainDataSourceLoadButton"
                Visibility="Collapsed" />
        </StackPanel>
    </Grid>
</controls:ChildWindow>